/**
 * 检查当前主题设置的工具
 */

export const checkCurrentTheme = () => {
  if (typeof window !== 'undefined') {
    try {
      const storedTheme = localStorage.getItem('theme-storage');
      console.log('存储的主题设置:', storedTheme);
      
      if (storedTheme) {
        const themeData = JSON.parse(storedTheme);
        console.log('解析后的主题数据:', themeData);
        console.log('当前主题模式:', themeData.state?.mode);
      }
      
      const htmlElement = document.documentElement;
      const themeAttribute = htmlElement.getAttribute('data-theme');
      console.log('HTML元素上的data-theme属性:', themeAttribute);
    } catch (error) {
      console.error('检查主题设置时出错:', error);
    }
  }
};

// 如果在浏览器环境中，立即执行检查
if (typeof window !== 'undefined') {
  // 延迟执行以确保DOM完全加载
  setTimeout(checkCurrentTheme, 1000);
}